<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue插件</title>
    <script type="text/javascript" src="../../js/vue.js"></script>
    <script type="text/javascript" src="vue-myPlugin.js"></script>
</head>
<body>
<div id="test">
    <p v-my-directive="msg"></p>
</div>
</body>
</html>
<script type="text/javascript">
    //声明使用插件
    Vue.use(MyPlugin) //内部会执行myPlugin.install(Vue)

    Vue.myGlobalMethod()
    const vm = new Vue({
        el: '#test',
        data: {
            msg: 'mask'
        }
    })
    vm.$myMethod()
</script>